package com.pqc.tbk.service.account;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.pqc.tbk.dao.user.UserDao;
import com.pqc.tbk.entity.account.User;

@Component
// 默认将类中的所有public函数纳入事务管理.
@Transactional(readOnly = true)
public class AccountManager {

	private UserDao userDao;

	@Autowired
	public void setUserDao(final UserDao userDao) {
		this.userDao = userDao;
	}

	public User findByUserName(final String username) {
		return userDao.findByUsername(username);
	}
}
